<template>
  <div>
    <van-swipe class="banner" :autoplay="3000" indicator-color="white">
    <van-swipe-item class="banner__item" v-for="(item,index) in data" :key=index>
      <van-image class="banner__item__image" :src="item.imageUrl"></van-image>
    </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: [],
    };
  },
  watch: {
    '$store.state.homeList.banner': {
      immediate: true,
      handler(val) {
        this.data = val.left;
      },
    },
  },

};
</script>

<style lang="less">
.banner{
  width: 342px;
  height: 498px;
  .banner__item__image{
    width: 342px;
    height: 498px;
  }
}

</style>
